package march.view 
{
	import flash.display.Bitmap;
	import flash.display.Sprite;
	import morn.core.components.BitmapText;
	import vo.GeneralVO;
	
	/**
	 * ...
	 * @author WLDragon 2014-04-26
	 */
	public class GeneralItem extends Sprite 
	{
		
		public function GeneralItem(data:GeneralVO) 
		{
			this.data = data;
			
			selectedBmp = new Bitmap(App.asset.getBitmapData("png.menu.selected"));
			selectedBmp.y = 4;
			addChild(selectedBmp);
			
			btText = new BitmapText();
			btText.x = 18;
			addChild(btText);
			if (data == null)
			{
				btText.text = "结束"; 
			}
			else
			{
				btText.text = data.name;
			}
			
			selected = false;
		}
		
		public function get selected():Boolean 
		{
			return _selected;
		}
		
		public function set selected(value:Boolean):void 
		{
			_selected = value;
			selectedBmp.visible = value;
		}
		
		private var _selected:Boolean;
		public var data:GeneralVO;
		public var selectedBmp:Bitmap;
		public var btText:BitmapText;
		
	}

}